<template>
  <div>
    <h1>白虎</h1>
    <p>老虎的姓名：{{route.params.tigerName}}</p>
    <p>老虎的姓名：{{route.params.tigerAge}}</p>
  </div>
</template>

<script setup>
// -------------------------导入区-------------------------
import {useRoute} from "vue-router";

// -------------------------数据区-------------------------
let route = useRoute();
console.log("路径变量 tigerName = " + route.params.tigerName);
console.log("路径变量 tigerName = " + route.params.tigerAge);

// -------------------------功能区-------------------------
</script>

<style scoped>
div {
  border: 1px solid black;
  width: 300px;
  height: 300px;
}
</style>